package com.gitee.W_Jun.virturamethodtable;

/**
 * @author https://gitee.com/W_Jun
 * @date 2021-12-25 16:27
 * @Description
 */
interface Friendly {
    void sayHello();
    void sayGoodbye();
}
class Dog {
    public void sayHello(){}
    public String toString() {
        return "Dog";
    }
}
class Cat implements Friendly {
    public void eat() {}
    public void sayHello(){}
    public void sayGoodbye(){}
    protected void finalize(){}
}
class CockerSpaniel extends Dog implements Friendly {
    public void sayHello() {
        super.sayHello();
    }
    public void sayGoodbye(){}
}
public class VirtualMethodTable {

}
